#include <bits/stdc++.h>

using namespace std;
const int MOD = 100;
const int FILENUMS = 3;
const int GROUPNUM = 58;
const int SIZE = 100000008 / GROUPNUM + 1;
const int cnt_seat = 64 - GROUPNUM;
int main()
{
    unsigned long long *arr = new unsigned long long[SIZE];
    memset(arr, 0, sizeof(unsigned long long) * SIZE);
    int maxnum = 0;
    fstream inputfile("test.in");
    fstream outputfile("test.out");
    int num;
    while (!inputfile.eof())
    {
        inputfile >> num;
        maxnum = max(maxnum, num);
        arr[num / GROUPNUM] |= (1ULL << (63 - num % GROUPNUM));
        arr[num / GROUPNUM]++;
    }
    inputfile.close();
    int cnt = 0;
    int c = 0;
    for (int i = 0; i < maxnum / GROUPNUM + 1; i++)
    {
        int thiscnt = (arr[i] << GROUPNUM) >> GROUPNUM;
        cnt += thiscnt;
        if (cnt >= MOD)
        {
            cnt %= MOD;
            int thisans = (i + 1) * GROUPNUM;
            int cnt_idx = 0;
            arr[i] >>= cnt_seat;
            do
            {
                thisans--;
                if(arr[i] & 1) {
                    cnt_idx++;
                }
                arr[i] >>= 1;
            } while (cnt_idx <= cnt);
            outputfile << thisans << endl;
            if((++c)>=10) break;
        }
    }
    // system("pause");
    return 0;
}
